@extends('admin.base.parent')
@section('content')
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="#">主页</a>
							</li>

							<li>
								<a href="#">评价详情</a>
							</li>
							<li class="active">评价操作页</li>
						</ul><!-- .breadcrumb -->
						 @if(session('msg'))
						 	<div class='alert alert-block alert-success'>
						 		{{ session('msg') }}
						 		<i class='icon'></i>
						 	</div>
						 @endif
						 @if(session('error'))
						 	<div class="alert alert-danger">
						 		{{ session('error') }}
						 		<i class='icon'></i>
						 	</div>
						 @endif
						<div class="nav-search" id="nav-search">
							<form class="form-search" action="{{ url('admin/comment') }}" method='get'>
								<span class="input-icon">
									<input type="text" placeholder="查找" class="nav-search-input" id="nav-search-input" autocomplete="off" name='name'/>
									<i class="icon-search nav-search-icon"></i>
									<button type="submit" class="btn btn-purple btn-sm">
										查找
									<i class="icon-search icon-on-right bigger-110"></i>
									</button>
								</span>
							</form>
						</div><!-- #nav-search -->
					</div>
						
					<div class="page-content">
						<div class="page-header">
							<h1>
								评价详情页
								<small>
									<i class="icon-double-angle-right"></i>
									评价操作页
								</small>
							</h1>
						</div><!-- /.page-header --> 
						<form action="{{ url('admin/type') }}" method='post' name='myform'>
							{{ csrf_field() }}
							{{ method_field('DELETE') }}
						</form>
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->

								<div class="row">
									<div class="col-xs-12">
										<div class="table-responsive">
											<table id="sample-table-1" class="table table-striped table-bordered table-hover">
												<thead>
													<tr>
														<th class="center">
															<label>
																<input type="checkbox" class="ace" />
																<span class="lbl"></span>
															</label>
														</th>
														<th>评论编号</th>
														<th>用户编号</th>
														<th>商品编号</th>
														<th>评论时间</th>
														<th>评论内容</th>
														<th>评价标记</th>
														<th>评价标记</th>
														<th>操作</th>
													</tr>
												</thead>
													@foreach($list as $v)
												<tbody>
													<tr>
														<td class="center">
															<label>
																<input type="checkbox" class="ace" />
																<span class="lbl"></span>
															</label>
														</td>

														<td>{{ $v->id }}</td>
														<td>{{ $v->uid }}</td>
														<td>{{ $v->did }}</td>
														<td>{{ date('Y-m-d H:i:s',$v->ptime) }}</td>
														<td>{{ $v->content }}</td>
														<td>
															@if($v->cmt == 1)
																好评
															@elseif($v->cmt == 2)
																中评
															@elseif($v->cmt == 3)
																差评
															@endif
														</td>
														<td>
															<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
																<a class="btn btn-xs btn-info" href="{{ url('admin/comment').'/'.$v->id}}/edit">
																	<i class="icon-edit bigger-120"  >&nbsp;修改</i>
																</a>

																<a class="btn btn-xs btn-danger" href='javascript:doDel({{ $v->id }})' >
																	<i class="icon-trash bigger-120" >&nbsp;删除</i>
																</a>
															</div>
														</td>
													</tr>
													@endforeach
												</tbody>
											</table>
											{{ $list->appends($where)->links() }}
										</div><!-- /.table-responsive -->
									</div><!-- /span -->
								</div><!-- /row -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
				<script>
					function doDel(id){
						if(confirm('确定删除吗？')){
							var form = document.myform;
							form.action = '/admin/comment/'+id;
							form.submit();
						}
					}
				</script>

@endsection